/*
 * @Author: 
 * @Date: 2024-05-19 10:21:30
 * @LastEditor: zhuxiaoyi
 * @LastEditTime: 2024-05-28 17:00:03
 * @Description: 
 */
import {
    Body,
    Controller,
    Del,
    Get,
    Inject,
    Param,
    Put,
    Query,
    Post
} from '@midwayjs/core';
import { GetModule1Dto,addProductDto } from '../dto/ModuleDto';
import { M1ModuleService } from '../service/module1.service'
@Controller('/module1')
export class HomeController {
    @Inject()
    m1ModuleService: M1ModuleService;

    @Get('/getProducts', { summary: '反演产品' })
    async getList(@Query() params: GetModule1Dto) {
        return await this.m1ModuleService.getProducts(params);
    }

    @Get('/deleteProduct', { summary: '反演产品' })
    async deleteProduct(@Param('id') id: number) {
        return await this.m1ModuleService.deleteProduct(id);
    }

    /* @Post('/addProduct', { summary: '反演产品推送' })
    async addProduct(@Body() params:addProductDto) {
        return await this.m1ModuleService.addProduct(params);
    } */

}
